package com.hspedu.homework.homework13;

/**
 * @author 谷其昊
 * @version 1.0
 * @date 2022/1/24
 * @time 20:06
 */
public class Student extends Person{
    private int stu_id;

    public Student(String name, String sex, int age, int stu_id) {
        super(name,sex,age);
        this.stu_id = stu_id;
    }

    public int getStu_id() {
        return stu_id;
    }

    public void setStu_id(int stu_id) {
        this.stu_id = stu_id;
    }

    public String study(){
        return "我承诺，我会好好学习";
    }

    @Override
    public String play() {
        return super.play() + "足球";
    }

    @Override
    public String toString() {
        return "Student{" +
                super.toString() +
                "stu_id=" + stu_id +
                '}';
    }

    @Override
    public String printInfo(){
        return "学生的信息：+"
                +super.printInfo()
                +"\n学号"+stu_id
                +"\n"+study()
                +"\n"+play();
    }
}
